#ifndef Game_h__
#define Game_h__

#include <GTL.h>
#include <GTLEngine.h>

using GTL::Engine::Point;

class SummonerGame : public GTL::Engine::Game
{
public:
	virtual int StartGame();
	virtual GTL::Engine::Mode* CreateMode(int id, int arg1, int arg2);

	///************************************************************************/
	/// Images
	///************************************************************************/

	GTL::Engine::Image iTiles;

	///************************************************************************/
	/// Network
	///************************************************************************/

	void ServerInit(uint16_t port);
	void ClientInit(const char* ip, uint16_t port);

	bool IsServer;
	eastl::string PlayerName;

	struct Player
	{
		GTL::Engine::ClientConnection* ConnToServer;
		int ID;
		eastl::string Name;
		bool Ready;

		Player() : ConnToServer(0), ID(0), Ready(false) {}
	};

	eastl::vector<Player> Players;

	Player* FindPlayer( int id );

	size_t MaxPlayers;

private:
	GTL::Engine::NetworkService* net;
};

#endif // Game_h__